package com.bdqn.struts.action;

import com.bdqn.struts.entity.Address;
import com.bdqn.struts.entity.User;
import com.opensymphony.xwork2.Action;


public class ShowOriginalAndJavaBeanAction implements Action {

    private User user;
    private String message;

    @Override
    public String execute() throws Exception {
           setUser(new User());
           getUser().setName("jbit");
           getUser().setAge(23);
           Address address = new Address();
           address.setCountry("中国");
           address.setCity("北京");
           address.setStreet("长安街");
           setMessage("展示原始类型即javaBean");
           return "SUCCESS";
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
